package com.android.xk.mask

import android.content.Context
import android.net.Uri
import android.widget.ImageView
import com.facebook.drawee.drawable.ScalingUtils
import com.facebook.drawee.view.SimpleDraweeView
import com.youth.banner.loader.ImageLoader


class PicassoImageLoader : ImageLoader()
{
    override fun displayImage(context: Context?, path: Any?, imageView: ImageView)
    {
        val uri = Uri.parse(path as String)
        imageView.setImageURI(uri)
    }

    override fun createImageView(context: Context?): ImageView
    {
        val view = SimpleDraweeView(context)
        view.hierarchy.apply {
            actualImageScaleType = ScalingUtils.ScaleType.FIT_XY
        }
        return view
    }
}